package com.file.system.service.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.file.system.entity.system.WebDictionaryVal;
import com.file.system.entity.res.DataPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 字典值 服务类
 *
 * @author jch
 * @since 2022-07-27
 */
public interface IWebDictionaryValService {

    //添加字典值
    boolean save(WebDictionaryVal webDictionaryVal);

    //删除字典值
    boolean removeById(@Param("id") Long id);

    //编辑字典值
    boolean updateById(@Param("et") WebDictionaryVal webDictionaryVal);

    //编辑
    boolean update(@Param("ew") UpdateWrapper<WebDictionaryVal> query);

    //添加字典值(批量)
    boolean saveBatch(@Param("list") List<WebDictionaryVal> webDictionaryValList);

    //查询字典值
    List<WebDictionaryVal> list(@Param("ew") QueryWrapper<WebDictionaryVal> query);

    //通过ids查询字典值集合
    List<WebDictionaryVal> listByIds(List<Long> ids);

    //查询字典值分页
    DataPage<List<WebDictionaryVal>> page(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize, @Param("ew") QueryWrapper<WebDictionaryVal> query);

    //通过id查询字典值
    WebDictionaryVal getById(@Param("id") Long id);

    //通过条件查询字典值
    WebDictionaryVal getOne(@Param("ew") QueryWrapper<WebDictionaryVal> query);

    //查询字典值数量
    int count(@Param("ew") QueryWrapper<WebDictionaryVal> query);

    //查询所有非删除状态字典值
    List<WebDictionaryVal> listAll();
}
